package com.leo.basic.utils;

import java.util.UUID;

/**
 * @ClassName UUIDCreator
 * @Description 生成32位的id
 * @Author wangss
 * @date 2021.09.23 16:38
 * @Version 1.0
 */
public class UUIDCreator {

    public static String getUUID32() {
        String s = UUID.randomUUID().toString();
        return s.substring(0, 8) + s.substring(9, 13) + s.substring(14, 18) + s.substring(19, 23) + s.substring(24);
    }

    public static void main(String[] args) {
        String s = UUID.randomUUID().toString();
        System.out.println(s);
        System.out.println(getUUID32());
    }
}
